
{% load static %}

<html>
	<head>
		<title>{% block title %} {% endblock %}</title>
		<!--<link rel="icon" href="imageset/favicon.png">-->
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

		<link rel="stylesheet" href="{% static "backend_static/css/materialize.min.css" %}">
		<!--<link rel="stylesheet" href="{% static "backend_static/css/style.css" %}">-->
		<script src="{% static "backend_static/js/jquery-3.2.1.min.js" %}"></script>
		<script src="{% static "backend_static/js/materialize.min.js" %}"></script>

		<script src="{% static "backend_static/js/script.js" %}"></script>
	</head>

	<body>
		{% if messages %}
			{% for message in messages %}
					<script>
						Materialize.toast('{{ message }}', 3000);
					</script>
			{% endfor %}
		{% endif %}
    <div class="container center-align">
      <h1>Login</h1>
			<div class="row">
				<form action="/loginmodule/auth" method="POST" class="col s12">{% csrf_token %}
					<div class="row">
						<div class="input-field col s12">
							<i class="material-icons prefix">account_circle</i>
		        	<input type="text" name="username" id="username" class="validate">
							<label for="username">Username</label>
						</div>
						<div class="input-field col s12">
							<i class="material-icons prefix">vpn_key</i>
							<input type="password" name="password" class="validate" id="password">
							<label for="password">Password</label>
						</div>
						<div class="input-field col s12">
		        	<button type="submit" class="btn">Login</button>
						</div>
					</div>
      	        </form>
                <div style="text-align:center">
                    <a href="/loginmodule/pre_register">
                        <button class="btn">Register</button>
                    </a>
                </div>
			</div>
    </div>
</body>

<div id="buttomPostion" style="overflow:hidden; position: fixed;bottom: 10px;width: 100%;">
            <a href="/admin">
            <button class="btn">管理员登录</button>
        </a>
</div>
</html>
